package com.settlement.system.service;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblBalanceWatcher;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * RR-日记账-余额监控 服务类
 * @author Ximi
 * @since 2020-11-17
 */

public interface ITblBalanceWatcherService extends IBaseService {



    /**
     * 获取合计
     *
     * @param params 请求参数
     * @return
     * @throws ServiceException
     */
    public TblBalanceWatcher getFoot(Map<String, Object> params) throws ServiceException;

    /**
     * 刷新
     *
     * @throws ServiceException
     */
    public void refresh(Map<String, Object> model) throws ServiceException;

    /**
     * 保存
     * @param originData
     * @param newData
     * @throws ServiceException
     */
    public void save(TblBalanceWatcher originData, TblBalanceWatcher newData) throws ServiceException;

    /**
     * selectOriginBillCount
     * @param channelName
     * @param shopNo
     * @param loginAccount
     * @param outDate
     * @return
     */
    public Integer selectOriginBillCount(String channelName, String shopNo, String loginAccount, String outDate);

    /**
     * selectOriginBillCount
     * @param map
     * @return
     */
    public Integer selectOriginBillCount(Map<String,Object>map);

    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    void saveData(List<TblBalanceWatcher> datas) throws ServiceException;
}

